package com.doit.demo02;

import java.io.*;

public class demo02_buffer {
    public static void main(String[] args) throws IOException {
        InputStream in = new BufferedInputStream(new FileInputStream("day21\\buffer\\a.txt"));

//        int data;
//        while ((data=in.read())!=-1){
//            System.out.println(data);
//        }

        int len;
        byte[] bytes = new byte[1024];
        while ((len=in.read(bytes))!=-1){
            System.out.println(new String(bytes,0,len));
        }
    }
}
